Programming with QuickTime VR

| Previous | Chapter contents | Chapter top | Section top | Next |

QTVRSetFieldOfView

You can use the QTVRSetFieldOfView function to set the vertical field of view of a QuickTime VR movie.

OSErr QTVRSetFieldOfView (QTVRInstance qtvr, floatfieldOfView);
qtvr
An instance of a QuickTime VR movie.
fieldOfView
The desired vertical field of view for the specified movie.
function result
A result code.

DESCRIPTION

The QTVRSetFieldOfView function sets the vertical field of view of the QuickTime VR movie specified by the qtvr parameter to the value specified by the fieldOfView parameter. That value is constrained by the maximum field of view of the movie. Values that lie outside that limit are clipped to the maximum. Pan and tilt angle values are also clipped if, when combined with the current field of view, they would cause an image to lie outside the current constraints.

If the control setting kQTVRCanZoom is disabled, the field of view is unchanged and QTVRSetFieldOfView returns the result code constraintReachedErr .

SPECIAL CONSIDERATIONS

The pan and tilt angles are subject to the current pan and tilt range constraints, as imposed by the viewing limits and the current field of view. Accordingly, if you want to change the field of view, you should do so before adjusting the pan or tilt angles. Otherwise, the pan and tilt angles are clipped against the current field of view, which may result in an incorrect view when you alter the field of view.

SEE ALSO

Use QTVRGetFieldOfView [link] to get the vertical field of view of a QuickTime VR movie. Listing 2-5 illustrates the use of QTVRSetFieldOfView .


© 1997 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |